package io.persimmon.core.util;

import ch.qos.logback.classic.Level;
import org.slf4j.Logger;

public class LoggerUtil {
    public static void log(Logger logger, Level level, String content, Object... data) {
        if (Level.DEBUG.equals(level)) {
            logger.debug(content, data);
        } else if (Level.INFO.equals(level)) {
            logger.info(content, data);
        } else if (Level.WARN.equals(level)) {
            logger.warn(content, data);
        } else if (Level.ERROR.equals(level)) {
            logger.error(content, data);
        } else if (Level.TRACE.equals(level)) {
            logger.trace(content, data);
        } else if (Level.ALL.equals(level)) {
            logger.info(content, data);
        }
    }
}
